Fully Qualified Name: | Laminas\Http\PhpEnvironment\Request |
Extends: | Request |
HTTP Request for current PHP environment
Name | Description | Defined By |
---|---|---|
__construct() | Construct Instantiates request. | Request |
__toString() | Allow PHP casting of this object | AbstractMessage |
fromString() | A factory that produces a Request object from a well-formed Http Request string | Request |
getAllowCustomMethods() | Request | |
getBasePath() | Get the base path. | Request |
getBaseUrl() | Get the base URL. | Request |
getContent() | Get raw request body | Request |
getCookie() | Return the Cookie header, this is the same as calling $request->getHeaders()->get('Cookie'); | Request |
getEnv() | Return the parameter container responsible for env parameters or a single parameter value. | Request |
getFiles() | Return the parameter container responsible for file parameters or a single file. | Request |
getHeader() | Get all headers of a certain name/type. | Request |
getHeaders() | Return the header container responsible for headers or all headers of a certain name/type | Request |
getMetadata() | Retrieve all metadata or a single metadatum as specified by key | Message |
getMethod() | Return the method for this request | Request |
getPost() | Return the parameter container responsible for post parameters or a single post parameter. | Request |
getQuery() | Return the parameter container responsible for query parameters or a single query parameter | Request |
getRequestUri() | Get the request URI. | Request |
getServer() | Return the parameter container responsible for server parameters or a single parameter value. | Request |
getUri() | Return the URI for this request object | Request |
getUriString() | Return the URI for this request object as a string | Request |
getVersion() | Return the HTTP version for this request | AbstractMessage |
isConnect() | Is this a CONNECT method request? | Request |
isDelete() | Is this a DELETE method request? | Request |
isFlashRequest() | Is this a Flash request? | Request |
isGet() | Is this a GET method request? | Request |
isHead() | Is this a HEAD method request? | Request |
isOptions() | Is this an OPTIONS method request? | Request |
isPatch() | Is this a PATCH method request? | Request |
isPost() | Is this a POST method request? | Request |
isPropFind() | Is this a PROPFIND method request? | Request |
isPut() | Is this a PUT method request? | Request |
isTrace() | Is this a TRACE method request? | Request |
isXmlHttpRequest() | Is the request a Javascript XMLHttpRequest? | Request |
renderRequestLine() | Return the formatted request line (first line) for this http request | Request |
setAllowCustomMethods() | Request | |
setBasePath() | Set the base path. | Request |
setBaseUrl() | Set the base URL. | Request |
setContent() | Set message content | Message |
setCookies() | Set cookies | Request |
setEnv() | Provide an alternate Parameter Container implementation for env parameters in this object, (this is NOT the primary API for value setting, for that see env()) | Request |
setFiles() | Provide an alternate Parameter Container implementation for file parameters in this object, (this is NOT the primary API for value setting, for that see getFiles()) | Request |
setHeaders() | Provide an alternate Parameter Container implementation for headers in this object, (this is NOT the primary API for value setting, for that see getHeaders()) | AbstractMessage |
setMetadata() | Set message metadata | Message |
setMethod() | Set the method for this request | Request |
setPost() | Provide an alternate Parameter Container implementation for post parameters in this object, (this is NOT the primary API for value setting, for that see getPost()) | Request |
setQuery() | Provide an alternate Parameter Container implementation for query parameters in this object, (this is NOT the primary API for value setting, for that see getQuery()) | Request |
setRequestUri() | Set the request URI. | Request |
setServer() | Provide an alternate Parameter Container implementation for server parameters in this object, (this is NOT the primary API for value setting, for that see getServer()) | Request |
setUri() | Set the URI/URL for this request, this can be a string or an instance of Laminas\Uri\Http | Request |
setVersion() | Set the HTTP version for this object, one of 1.0, 1.1 or 2 (AbstractMessage::VERSION_10, AbstractMessage::VERSION_11, AbstractMessage::VERSION_2) | AbstractMessage |
toString() | Request |
Construct Instantiates request.
Parameter Name | Type | Description |
---|---|---|
$allowCustomMethods | bool |
Returns:
Allow PHP casting of this object
Returns: string
A factory that produces a Request object from a well-formed Http Request string
Parameter Name | Type | Description |
---|---|---|
$string | string | |
$allowCustomMethods | bool |
Returns: static
Returns: bool
Get the base path.
Returns: string
Get the base URL.
Returns: string
Get raw request body
Returns: string
Return the Cookie header, this is the same as calling $request->getHeaders()->get('Cookie');
Returns: \Header\Cookie|bool
Return the parameter container responsible for env parameters or a single parameter value.
Parameter Name | Type | Description |
---|---|---|
$name | string|null | Parameter |
$default | mixed|null | Default |
Returns: \Laminas\Stdlib\ParametersInterface|mixed
Return the parameter container responsible for file parameters or a single file.
Parameter Name | Type | Description |
---|---|---|
$name | string|null | Parameter |
$default | mixed|null | Default |
Returns: \ParametersInterface|mixed
Get all headers of a certain name/type.
Parameter Name | Type | Description |
---|---|---|
$name | string|null | Header |
$default | mixed|null | Default |
Returns: \Laminas\Http\Headers|bool|\Laminas\Http\Header\HeaderInterface|\ArrayIterator
Return the header container responsible for headers or all headers of a certain name/type
Parameter Name | Type | Description |
---|---|---|
$name | string|null | Header |
$default | mixed|null | Default |
Returns: \Laminas\Http\Headers|bool|\Laminas\Http\Header\HeaderInterface|\ArrayIterator
Retrieve all metadata or a single metadatum as specified by key
Parameter Name | Type | Description |
---|---|---|
$key | null|string|int | |
$default | null|mixed |
Returns: mixed
Return the method for this request
Returns: string
Return the parameter container responsible for post parameters or a single post parameter.
Parameter Name | Type | Description |
---|---|---|
$name | string|null | Parameter |
$default | mixed|null | Default |
Returns: \ParametersInterface|mixed
Return the parameter container responsible for query parameters or a single query parameter
Parameter Name | Type | Description |
---|---|---|
$name | string|null | Parameter |
$default | mixed|null | Default |
Returns: \ParametersInterface|mixed
Get the request URI.
Returns: string
Return the parameter container responsible for server parameters or a single parameter value.
Parameter Name | Type | Description |
---|---|---|
$name | string|null | Parameter |
$default | mixed|null | Default |
Returns: \Laminas\Stdlib\ParametersInterface|mixed
Return the URI for this request object
Returns: \HttpUri
Return the URI for this request object as a string
Returns: string
Return the HTTP version for this request
Returns: string
Is this a CONNECT method request?
Returns: bool
Is this a DELETE method request?
Returns: bool
Is this a Flash request?
Returns: bool
Is this a GET method request?
Returns: bool
Is this a HEAD method request?
Returns: bool
Is this an OPTIONS method request?
Returns: bool
Is this a PATCH method request?
Returns: bool
Is this a POST method request?
Returns: bool
Is this a PROPFIND method request?
Returns: bool
Is this a PUT method request?
Returns: bool
Is this a TRACE method request?
Returns: bool
Is the request a Javascript XMLHttpRequest?
Should work with Prototype/Script.aculo.us, possibly others.
Returns: bool
Return the formatted request line (first line) for this http request
Returns: string
Parameter Name | Type | Description |
---|---|---|
$strictMethods | bool |
Returns:
Set the base path.
Parameter Name | Type | Description |
---|---|---|
$basePath | string |
Returns: $this
Set the base URL.
Parameter Name | Type | Description |
---|---|---|
$baseUrl | string |
Returns: $this
Set message content
Parameter Name | Type | Description |
---|---|---|
$value | mixed |
Returns: \Message
Set cookies
Instantiate and set cookies.
Parameter Name | Type | Description |
---|---|---|
$cookie | ||
$cookie |
Returns: $this
Provide an alternate Parameter Container implementation for env parameters in this object, (this is NOT the primary API for value setting, for that see env())
Parameter Name | Type | Description |
---|---|---|
$env | \ParametersInterface |
Returns: $this
Provide an alternate Parameter Container implementation for file parameters in this object, (this is NOT the primary API for value setting, for that see getFiles())
Parameter Name | Type | Description |
---|---|---|
$files | \ParametersInterface |
Returns: $this
Provide an alternate Parameter Container implementation for headers in this object, (this is NOT the primary API for value setting, for that see getHeaders())
Parameter Name | Type | Description |
---|---|---|
$headers | \Headers |
Returns: $this
Set message metadata
Non-destructive setting of message metadata; always adds to the metadata, never overwrites the entire metadata container.
Parameter Name | Type | Description |
---|---|---|
$spec | string|int|array|\Traversable | |
$value | mixed |
Returns: \Message
Set the method for this request
Parameter Name | Type | Description |
---|---|---|
$method | string |
Returns: $this
Provide an alternate Parameter Container implementation for post parameters in this object, (this is NOT the primary API for value setting, for that see getPost())
Parameter Name | Type | Description |
---|---|---|
$post | \ParametersInterface |
Returns: $this
Provide an alternate Parameter Container implementation for query parameters in this object, (this is NOT the primary API for value setting, for that see getQuery())
Parameter Name | Type | Description |
---|---|---|
$query | \ParametersInterface |
Returns: $this
Set the request URI.
Parameter Name | Type | Description |
---|---|---|
$requestUri | string |
Returns: $this
Provide an alternate Parameter Container implementation for server parameters in this object, (this is NOT the primary API for value setting, for that see getServer())
Parameter Name | Type | Description |
---|---|---|
$server | \ParametersInterface |
Returns: $this
Set the URI/URL for this request, this can be a string or an instance of Laminas\Uri\Http
Parameter Name | Type | Description |
---|---|---|
$uri | string|\HttpUri |
Returns: $this
Set the HTTP version for this object, one of 1.0, 1.1 or 2 (AbstractMessage::VERSION_10, AbstractMessage::VERSION_11, AbstractMessage::VERSION_2)
Parameter Name | Type | Description |
---|---|---|
$version | string | (Must |
Returns: $this
Returns: string